/*
 * Menu.h
 *
 *  Created on: Sep 11, 2012
 *      Author: dimir
 */

#ifndef MENU_H_
#define MENU_H_

#include "Message.h"
#include "Client.h"
#include "Server.h"
#include <vector>
#include <iostream>
#include <string>

typedef enum{ 	I_REGISTRATION,			//0
				I_SEND_MESSAGE,			//1
				I_READ_MESSAGE,			//2
				I_GET_ID_CLIENTS,		//3
				I_GET_ID_CLIENTS_LOCAL,	//4
				I_UNREGISTERED,			//5
				I_EXIT} MenuItem;		//6

static const char* MSG[] = {
			"Registration on server new client.",				//0
			"Send message (to one or all clients on server)",	//1
			"Read message (from one or all clients on server)",	//2
			"Get id all clients on server.",					//3
			"Get id all clients on local PC.",					//4
			"Unregistered client on server.",					//5
			"Exit from program."								//6
			};

typedef struct {
	unsigned int 	toID;
	unsigned int 	fromID;
	char*		 	message;
	MenuItem		item;
} info;


MenuItem menu();

info* process(MenuItem item);

void action(const info* inf, std::vector<Client*>& clients);


// !! TODO add structure info



#endif /* MENU_H_ */
